<template>
	<view class="news-detail_wrapper">
		<!-- 图片 -->
		<view class="border">
			<image class="img w100" :src="newsContent.thumbnail"></image>
		</view>
		
		<view class="content-cox">
			<!-- 标题页面 -->
			<view class="title ft16">
			<text>{{newsContent.title}}</text>
			</view>
			<!-- 时间有标签盒子 -->
			<view class="time-box">
				<view class="image_wrap">
					<image src="https://pcdcoin.oss-cn-chengdu.aliyuncs.com/pcdApp/news/hot.png" mode=""></image>
				</view>
				<view class="time">
					{{newsContent.update_time}}
				</view>
			</view>
			<!-- <view class="ft12 mt10 gray">{{newsContent.update_time}}</view> -->
			<!-- <view class="ft12 mb10 mt10">摘要：{{newsContent.abstract}}</view> -->
			<!-- 文字页面 -->
			<view>
				<view class="content" v-html="newsContent.content">
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				newsContent:{}
			}
		},
		onLoad(option) {
			this.getNewsDetail(option.c_id, option.id)
		},
		methods: {
			getNewsDetail(c_id, id) {
				this.$api.getNewsDetail({
					id: id
				}, res => {
					if (res.data.type == 'ok') {
						console.log(res.data)
						this.newsContent = res.data.message;
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.news-detail_wrapper{
		height: 100vh;
		background-color: #FFFFFF;
		overflow: auto;
	}
	.border{
		.img {
			width: 100%;
			height:400upx;
		}
	}
	.time-box{
		display: flex;
		align-items: center;
		margin:20upx 0 30upx 0 ;
		height: 22upx;
		.time{
			font-size:21upx;
			font-weight:400;
			color:rgba(51,51,51,1);
			line-height:11upx;
			opacity:0.2;
		}
		.image_wrap{
			height: 30upx;
			width:30upx;
			margin-right: 11upx;
			image{
				height: 100%;
				width: 100%;
			}
		}
		
		}
	
		.content-cox{
			padding:37upx 34upx 41upx 41upx;
				
			.title{
				
				text{
					
					width:667upx;
					height:96upx;
					font-size:36upx;
					font-family:Microsoft YaHei;
					font-weight:500;
					color:rgba(51,51,51,1);
					line-height:60upx;
				}
			}
			
			.content {
				line-height:50upx;
				p{
					span{
						font-size: 18upx !important;
						line-height: 51upx !important;
					}
				}
				
	}
		}
	
</style>
